package com.saas.sql;

public class ServiceQuery
{
  public static String service_INS_ONE_SERVICE = "insert into service(cust_id,service_name,service_desc,class_name,class_id,oper_user,oper_time,add_date,validity,web_tag) values (:VCUST_ID,:VSERVICE_NAME,:VSERVICE_DESC,:VCLASS_NAME,:VCLASS_ID,:VOPER_USER,now(),now(),:VVALIDITY,'0')";
  public static String service_UPDATE_SERVICE_BY_ALL = "update service set service_name=:VSERVICE_NAME,service_desc=:VSERVICE_DESC,class_id=:VCLASS_ID,class_name=:VCLASS_NAME,validity=:VVALIDITY where service_id = :VSERVICE_ID";
  public static String service_DELETE_FROM_SERVICE = "delete from service  where service_id = :VSERVICE_ID";
  public static String service_GET_All_SERVICE_INFO = "select cust_id,service_id,service_name,service_desc,class_name,class_id,add_date,validity,oper_time from service where validity <> 9 and cust_id = :VCUST_ID  order by oper_time desc";
  public static String service_GET_ONE_SERVICE_INFO = "select * from service where service_id = :VSERVICE_ID";
  public static String service_GET_All_SERVICE_INFO_ADMIN = "select cust_id,service_id,service_name,service_desc,class_name,class_id,add_date,validity from service where validity = 0 order by oper_time";
  public static String service_GET_All_SERVICE_INFO_ADMIN_A = "select cust_id,service_id,service_name,service_desc,class_name,class_id,add_date,validity from service where validity = 1 order by oper_time";
  public static String service_CHECK_SERVICE_INFO = "update service set validity = :VVALIDITY,back_reason = :VBACK_REASON where service_id = :VSERVICE_ID";
  public static String service_GET_SERVICE_CLASS_NAME_BY_CLASS_ID = "select class_name from service where class_id = :VCLASS_ID";
  public static String service_SEL_SERVICE_BY_MANAGE = "select cust_id,service_id,service_name,service_desc,class_name,class_id,add_date,validity from service where (validity = 0 or validity=1 or validity=2) order by oper_time desc";
  public static String service_SEL_SERVICE_BY_MANAGE2 = "select cust_id,service_id,service_name,service_desc,class_name,class_id,add_date,validity from service where (validity = 0 or validity=2) order by oper_time desc";
  public static String service_SEL_SERVICE_BY_MANAGE_CHECK = "select cust_id,service_id,service_name,service_desc,class_name,class_id,add_date,validity from service where validity = 0 order by oper_time";
}

